package org.zongf.learn.grpc.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zongf.learn.grpc.remote.IHelloRpcRmtService;
import org.zongf.learn.grpc.remote.impl.HelloRpcRmtService;

/**
 * @author zongf
 * @since 2023-07-10
 **/
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private IHelloRpcRmtService remoteService;


    @GetMapping("/say")
    public String say(String name) {

        String response = remoteService.ping(name);

        return response;
    }

}
